package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SalaryMapper;
import com.ruoyi.system.domain.Salary;
import com.ruoyi.system.service.ISalaryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 薪资Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-15
 */
@Service
public class SalaryServiceImpl implements ISalaryService 
{
    @Autowired
    private SalaryMapper salaryMapper;

    /**
     * 查询薪资
     * 
     * @param salaryID 薪资主键
     * @return 薪资
     */
    @Override
    public Salary selectSalaryBySalaryID(Long salaryID)
    {
        return salaryMapper.selectSalaryBySalaryID(salaryID);
    }

    /**
     * 查询薪资列表
     * 
     * @param salary 薪资
     * @return 薪资
     */
    @Override
    public List<Salary> selectSalaryList(Salary salary)
    {
        return salaryMapper.selectSalaryList(salary);
    }

    /**
     * 新增薪资
     * 
     * @param salary 薪资
     * @return 结果
     */
    @Override
    public int insertSalary(Salary salary)
    {
        return salaryMapper.insertSalary(salary);
    }

    /**
     * 修改薪资
     * 
     * @param salary 薪资
     * @return 结果
     */
    @Override
    public int updateSalary(Salary salary)
    {
        return salaryMapper.updateSalary(salary);
    }

    /**
     * 批量删除薪资
     * 
     * @param salaryIDs 需要删除的薪资主键
     * @return 结果
     */
    @Override
    public int deleteSalaryBySalaryIDs(String salaryIDs)
    {
        return salaryMapper.deleteSalaryBySalaryIDs(Convert.toStrArray(salaryIDs));
    }

    /**
     * 删除薪资信息
     * 
     * @param salaryID 薪资主键
     * @return 结果
     */
    @Override
    public int deleteSalaryBySalaryID(Long salaryID)
    {
        return salaryMapper.deleteSalaryBySalaryID(salaryID);
    }
}
